import { createRouter, createWebHashHistory } from "vue-router";

const routes = [
    {
        path: "/",
        name: "layout",
        component: () => import("../layout/index.vue"),
        meta: { title: "Home", requireAuth: true },
        children: [
            {
                path: "/",
                name: "home",
                component: () => import("../views/home/index.vue"),
                meta: { title: "Home", requireAuth: true },
            },
            {
                path: "/playground",
                name: "playground",
                component: () => import("../views/playground/index.vue"),
                meta: { title: "playground", requireAuth: true },
            },
            {
                path: "/printer",
                name: "Printer",
                component: () => import("../views/printer/index.vue"),
                meta: { title: "Printer", requireAuth: true },
            },
            {
                path: "/mbti-battle",
                name: "MBTIBattle",
                component: () => import("../views/mbti-battle/index.vue"),
                meta: { title: "MBTI战斗模拟器", requireAuth: true },
            }
        ]
    },
    {
        path: "/inspiration-generator",
        name: "InspirationGenerator",
        component: () => import("../views/inspiration-generator/index.vue"),
        meta: { title: "Inspiration Generator", requireAuth: true },
    },
    {
        path: "/test",
        name: "Test",
        component: () => import("../views/test/index.vue"),
        meta: { title: "测试", requireAuth: true },
    },
]

const router = createRouter({
    history: createWebHashHistory(),
    routes: routes,
});

export default router;